// 封装请求http
import '@/utils/request.js'

// 高德api
const API_KEY = 'b5e7deb07f56402a151db5861f241ff4'
export const getWeatherData = function (city) {
	return uni.$http.get('https://restapi.amap.com/v3/weather/weatherInfo', {
		key: API_KEY,
		city
	})
}

//黑马获取城市api
export const getCityCode = () => {
	return uni.$http.get('http://hmajax.itheima.net/api/weather/city?city=深圳')
}

// hm 获取天气预报api

export const getHmWeatherData = () => {
	return uni.$http.get('http://hmajax.itheima.net/api/weather?city=440300')
}
